.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.content {
  background: #fff;
  width: 100%;
}

.detailCard {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  .header {
    // padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;

    .authorInfo {
      // margin-left: 12px;

      .authorName {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin-bottom: 4px;
      }

      .postTime {
        color: #8c8c8c;
        font-size: 14px;

        .anticon {
          margin-right: 4px;
        }
      }
    }
  }

  .body {
    // padding: 20px;
    
    .title {
      font-size: 22px;
      font-weight: 600;
      color: #333;
      margin-bottom: 16px;
    }

    .text {
      font-size: 16px;
      line-height: 1.8;
      color: #333;
      margin-bottom: 20px;
      white-space: pre-wrap;
    }
  }

  .footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;

    .shareAction {
      cursor: pointer;
      color: #666;
      font-size: 14px;
      transition: color 0.3s;
      padding: 8px 16px;
      border-radius: 4px;

      &:hover {
        color: #1890ff;
        background: rgba(24, 144, 255, 0.1);
      }

      .anticon {
        margin-right: 4px;
      }
    }
  }
}

.mediaContent {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.mediaGrid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);

  &:has(.mediaWrapper:only-child) {
    grid-template-columns: minmax(0, 2fr);
    
    .mediaWrapper {
      padding-bottom: 56.25%;
    }
  }

  &:has(.mediaWrapper:first-child:nth-last-child(2)) {
    grid-template-columns: repeat(2, 1fr);
  }

  .mediaWrapper {
    position: relative;
    padding-bottom: 100%;
    background: #f8f8f8;
    border-radius: 4px;
    overflow: hidden;

    .imageItem {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;

      :global {
        .ant-image {
          width: 100%;
          height: 100%;
          
          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
        }
      }
    }
  }
}

.videoList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;

  .videoWrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;

    > div {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }
}

:global {
  .ant-image-preview-operations {
    .ant-image-preview-switch-left,
    .ant-image-preview-switch-right {
      width: 44px;
      height: 44px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 50%;

      &:hover {
        background: rgba(255, 255, 255, 0.3);
      }
    }
  }

  .ant-image-preview-body {
    video {
      display: block;
      margin: 0 auto;
    }
  }
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .detailCard {
    .header {
      margin-bottom: 16px;
    }

    .content {
      .title {
        font-size: 20px;
        margin-bottom: 12px;
      }

      .text {
        font-size: 15px;
        line-height: 1.6;
      }
    }
  }

  .mediaGrid {
    gap: 4px;
  }

  .mediaContent {
    gap: 12px;
  }

  .videoList {
    grid-template-columns: 1fr;
    gap: 12px;
  }
} 